/* eslint-disable import/order */
import { createApp } from 'vue'
import App from './App.vue'

// 全局样式（additionalData 生效）
import './style.scss'

// 状态管理
import stores, { installStore } from './stores'

// 路由器
import router from './router'

// VXE PC UI

import {
  VxeLoading,
  VxePager,
  VxeTooltip,
} from 'vxe-pc-ui'
import 'vxe-pc-ui/lib/style.css'

// VXE Table
import {
  VxeColgroup,
  VxeColumn,
  VxeGrid,
  VxeTable,
  VxeToolbar,
} from 'vxe-table'
import 'vxe-table/lib/style.css'

// Expresso Plus
import '@expresso/plus/styles/index.scss'
import { installExpressoPlus } from './helpers'
import '@expresso/plus/locale'

// Vue3 Perfect Scrollbar
// import 'vue3-perfect-scrollbar/style.css'

const app = createApp(App); {
  app.use(stores)
  app.use(router)

  /* VXE PC UI */
  app.use(VxeLoading)
    .use(VxeTooltip)
    .use(VxePager)

  /* VXE Table */
  app.use(VxeTable)
    .use(VxeColumn)
    .use(VxeColgroup)
    .use(VxeGrid)
    .use(VxeToolbar)

  /* 指令 */
  app.directive('resize', vResize)

  /* 全局状态 */
  installStore()

  /* 功能包 */
  installExpressoPlus()
}

app.mount('#app')
